/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package demo928;
import java.util.ArrayList;

/**
 *
 * @author Administrator
 */
public class ArrayListStringDemo {
   
  
    public static void main(String args[]){
        ArrayList<String> stringList=new ArrayList<String>();
        stringList.add("zhang");
        stringList.add("li");
        stringList.add("wang");
        System.out.println(stringList.get(2));
        for(int i=0;i<stringList.size();i++){
          System.out.println(stringList.get(i));
            
        }
        
        for(String s:stringList){
          System.out.println(s);
            
        }
        
        
        
       
      
        
        
        
        
        
        
    }
    
}
